﻿@model IEnumerable<VolunteerWebsite.Models.News>

@{
    ViewBag.Title = "新闻";
}
<link href="../../Content/news.css" rel="stylesheet" type="text/css" />
<h2>新闻列表</h2>
@if (Request.IsAuthenticated)
{
    <p>
        @Html.ActionLink("添加新闻", "Create")    
    </p>
}
<table>
    <tr>
        <th>
            新闻标题
        </th>
        <th>
            发布时间
        </th>
        <th>
            作者
        </th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.ActionLink(@Html.DisplayFor(modelItem => item.Title).ToString(), "Details", new { id = item.ID })
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ReleaseDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Author)
        </td>
    </tr>
}

</table>
